﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nage.Algorithms.Solution;
using Nage.Algorithms.Population;

namespace Nage.Algorithms.Evolution
{    
    /// <summary>
    /// Population recombination interface. When implemented, defines how
    /// population should recombine solutions in time.
    /// </summary>
    /// <typeparam name="TSol">Type of the solution</typeparam>
    public interface IPopulationRecombination<TSol> where TSol : ISolution
    {
        /// <summary>
        /// Recombines the population giving a new, recombined one.
        /// Note that method should return a completely new population,
        /// not the old, recombined one.
        /// </summary>
        /// <param name="population">Current population</param>
        /// <returns>New, recombined population</returns>
        IPopulation<TSol> Recombine(IPopulation<TSol> population);
    }
}
